Environment:192.168.2.10192.168.2.11Implementation: 2.10 SSH without password login to 2.11In 2.10 ssh to 2.11 machines, a password is required, which makes it inconvenient for some scripts to work because of the need for a password, which requires manual intervention. The previous method is to copy Authorized_keys inside (remember, before), recently found a command ssh
Always want to transfer their server SSH authentication mode from user name password mode to RSA and DSA authentication protocol, through the release of OpenSSH 4.2, today wrote a configuration process and collected some reference articles on RSA and DSA.Idea Finishing:Has not understood the authentication process in the public key mode, here summarizes the method of making and placing the public key and the secret key. The following assumptions are g
SSH to the 163 host requires a password, which is inconvenient for some scripts because the password is required, that is, manual intervention is required. The method used previously was to copy the authorized_keys file (I can't remember it, I used it before). Recently, I found a command ssh-copy-ID is very convenient. I tried it and it really worked well. It was recorded below:
On 192.168.42.142
1) Run
path and file name-P ' password ': Specifies the password for the encrypted private keyThe public key is appended to the remote host in the ~/.ssh/authorized_keys file or ~/.ssh/authorized_keys2 file in the user's home directory, and is generally appended to the Authorized_keys file.Ssh-copy-id: Transfer the public key to the remote server ~/.ssh/id_rsa.pub publ
Environment:192.168.2.10192.168.2.11Implementation: 2.10 SSH without password login to 2.11In 2.10 ssh to 2.11 machines, a password is required, which makes it inconvenient for some scripts to work because of the need for a password, which requires manual intervention. The previous method is to copy Authorized_keys inside (remember, before), recently found a command ssh
SSH to the 192.168.88.61 machine requires a password, which is inconvenient for some scripts because of the need for a password, which requires manual intervention. Recently found a command Ssh-copy-id is very convenient, tested, and sure enough to use, recorded:On the 192.168.88.61 machine.1) Run: ssh-keygen-t RSA2) T
:
$ Password: (enter Password)
At this point, if the secret is correct, you can log in.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In the trust environment, if each remote login, you have to enter a password, feel too wasted time, especially the password is very complex, maintenance of the server more than the case.
So there is a normal need: you do not have to enter a password to achieve remote logins.
The implementation steps are as follows:
1, local generat
its own identity flag "private key" to achieve the purpose of verification, and private key can not be inferred from the public key backwards. This avoids the potential for password leaks caused by network eavesdropping. The client needs to be careful to save its own private key to avoid being stolen by others, and once that happens, the server will need to replace the trusted public key list.2, to achieve the effect:The network topology diagram is as follows: A total of 4 servers, the host nam
, there may be several reasons why the target server has replaced the public key, and the destination server has replaced the IP address or domain name, causing you to connect to the other host causing the public key to be mismatched; Whatever the reason, you should be wary of establishing a connection. Note:[1] "challenge" refers to the server using public key encryption data sent to the client, the client uses a paired private key to decrypt the data, the client successfully decrypted after
AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg733www+wC604ydGXA8VJiS5ap43JXiUFFAaQ==3 Displaying the public key fingerprint[[emailprotected] ssh]#
Ssh-keygen generates a public and private key pair. Ssh-copy-id The local public key is copied to the remote machine's Authorized_keys file, Ssh-copy-id can also let you have to the remote machine home, ~./SSH, and ~/.ssh/authoriz
Ssky-keygen + ssh-copy-id login remote Linux host without passwordUsing Ssky-keygen and Ssh-copy-id in the example below, you can log in to a remote Linux host with a simple setup of 3 steps without entering a password.Ssh-
Using Ssky-keygen and Ssh-copy-id in the example below, you can log in to a remote Linux host with a simple setup of 3 steps without entering a password.Ssh-keygenCreate public keys and keys.The Ssh-copy-id copies the local host's public key to the remote host's Authorized_keys file.Ssh-copy-idThe User home directory (
In the following example, ssky-keygen and ssh-copy-id can be used to log on to a remote Linux host without a password. Ssh-keygen creates the public key and key. Ssh-copy-id copies the public key of the local host to the authorize
I. Overview
1, is to allow two Linux machines to use SSH between the user name and password is not required. Digital signature RSA or DSA is used to complete this operation.
2. Model Analysis
Assuming that a (192.168.20.59) is a client machine, B (192.168.20.60) is the target machine;The purpose to be achieved:A machine SSH login B machine does not need to enter
Linux Ssh-keygen generate public and private keysThe following command tests OK on the centos6.6.Previously, it was necessary to enter 3 consecutive times, and now after adding the parameters, the Id_rsa and id_rsa.pub are generated directly in the ~/.SSH directory.Ssh-keygen
Use ssh-keygen, implement password-free login to linux host 192.168.1.2 server 192.168.1.3 first generate key ssh-keygen-t rsa in the user directory of the local host and press four enter keys as prompted, the key to be used is generated. the generated file id_rsa.pub is dis
Using Ssky-keygen and Ssh-copy-id in the example below, you can log in to a remote Linux host with a simple setup of 3 steps without entering a password.Ssh-keygen create public keys and keys.The Ssh-copy-id copies the local host's public key to the remote host's Authorized_
1 Local Create SSH key
Ssh-keygen
2 Copy public key to "landed machine" Enter password,
SCP Id_rsa.pub root@10.35.0.35:~/.ssh/id_rsa.pub
3 SSH to "Landing machine" to the public key into the "Authorized_keys" (if multiple machines need to use RSA key authentication login
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.